package com.css.dzj.dzjap.modules.info.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.SQLDelete;

import javax.persistence.*;

import java.util.Date;
import java.util.Objects;

@Entity
@SQLDelete(sql = "update AP_EXPERT set EXPERT_DEL_FLAG = 1 where EXPERT_ID = ?")
@Table(name = "AP_EXPERT", schema = "DZJAP", catalog = "")
public class ApExpertEntity {
    private String expertId;
    private String expertName;
    private String expertIdcard;
    private String expartType;
    private String expertSex;
    private String expertSeniority;
    private Date expertCreatTime;
    private String expertDelFlag;
    private String expertLevl;
    private Date updateTime;
    private String drawExpertId;
    private String unitAddress;
    private Date workTime;
    private String major;
    private String unitName;
    private String unitCode;
    private String expertTel;
    private String certype;
    private String lineStandard;
    private String lineType;
    private String expertAddress;
    private String isBlackList;
    @Id
    @Column(name = "EXPERT_ID")
    public String getExpertId() {
        return expertId;
    }

    public void setExpertId(String expertId) {
        this.expertId = expertId;
    }

    @Basic
    @Column(name = "EXPERT_NAME")
    public String getExpertName() {
        return expertName;
    }

    public void setExpertName(String expertName) {
        this.expertName = expertName;
    }

    @Basic
    @Column(name = "EXPERT_IDCARD")
    public String getExpertIdcard() {
        return expertIdcard;
    }

    public void setExpertIdcard(String expertIdcard) {
        this.expertIdcard = expertIdcard;
    }

    @Basic
    @Column(name = "EXPART_TYPE")
    public String getExpartType() {
        return expartType;
    }

    public void setExpartType(String expartType) {
        this.expartType = expartType;
    }

    @Basic
    @Column(name = "EXPERT_SEX")
    public String getExpertSex() {
        return expertSex;
    }

    public void setExpertSex(String expertSex) {
        this.expertSex = expertSex;
    }

    @Basic
    @Column(name = "EXPERT_SENIORITY")
    public String getExpertSeniority() {
        return expertSeniority;
    }

    public void setExpertSeniority(String expertSeniority) {
        this.expertSeniority = expertSeniority;
    }
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Basic
    @Column(name = "EXPERT_CREAT_TIME")
    public Date getExpertCreatTime() {
        return expertCreatTime;
    }

    public void setExpertCreatTime(Date expertCreatTime) {
        this.expertCreatTime = expertCreatTime;
    }

    @Basic
    @Column(name = "EXPERT_DEL_FLAG")
    public String getExpertDelFlag() {
        return expertDelFlag;
    }

    public void setExpertDelFlag(String expertDelFlag) {
        this.expertDelFlag = expertDelFlag;
    }

    @Basic
    @Column(name = "EXPERT_LEVL")
    public String getExpertLevl() {
        return expertLevl;
    }

    public void setExpertLevl(String expertLevl) {
        this.expertLevl = expertLevl;
    }
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Basic
    @Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "DRAW_EXPERT_ID")
    public String getDrawExpertId() {
        return drawExpertId;
    }

    public void setDrawExpertId(String drawExpertId) {
        this.drawExpertId = drawExpertId;
    }

    @Basic
    @Column(name = "UNIT_ADDRESS")
    public String getUnitAddress() {
        return unitAddress;
    }

    public void setUnitAddress(String unitAddress) {
        this.unitAddress = unitAddress;
    }
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Basic
    @Column(name = "WORK_TIME")
    public Date getWorkTime() {
        return workTime;
    }

    public void setWorkTime(Date workTime) {
        this.workTime = workTime;
    }

    @Basic
    @Column(name = "MAJOR")
    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Basic
    @Column(name = "UNIT_NAME")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    @Basic
    @Column(name = "UNIT_CODE")
    public String getUnitCode() {
        return unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    @Basic
    @Column(name = "EXPERT_TEl")
    public String getExpertTel() {
        return expertTel;
    }

    public void setExpertTel(String expertTel) {
        this.expertTel = expertTel;
    }
    @Basic
    @Column(name = "CERTYPE")
    public String getCertype() {
        return certype;
    }

    public void setCertype(String certype) {
        this.certype = certype;
    }
    @Basic
    @Column(name = "LINE_STANDARD")
    public String getLineStandard() {
        return lineStandard;
    }

    public void setLineStandard(String lineStandard) {
        this.lineStandard = lineStandard;
    }
    @Basic
    @Column(name = "LINE_TYPE")
    public String getLineType() {
        return lineType;
    }

    public void setLineType(String lineType) {
        this.lineType = lineType;
    }
    @Basic
    @Column(name = "EXPERT_ADDRESS")
    public String getExpertAddress() {
        return expertAddress;
    }

    public void setExpertAddress(String expertAddress) {
        this.expertAddress = expertAddress;
    }

    @Basic
    @Column(name = "IS_BLACK_LIST")
    public String getIsBlackList() {
        return isBlackList;
    }

    public void setIsBlackList(String isBlackList) {
        this.isBlackList = isBlackList;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApExpertEntity that = (ApExpertEntity) o;
        return Objects.equals(expertId, that.expertId) &&
                Objects.equals(expertName, that.expertName) &&
                Objects.equals(expertIdcard, that.expertIdcard) &&
                Objects.equals(expartType, that.expartType) &&
                Objects.equals(expertSex, that.expertSex) &&
                Objects.equals(expertSeniority, that.expertSeniority) &&
                Objects.equals(expertCreatTime, that.expertCreatTime) &&
                Objects.equals(expertDelFlag, that.expertDelFlag) &&
                Objects.equals(expertLevl, that.expertLevl) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(drawExpertId, that.drawExpertId) &&
                Objects.equals(unitAddress, that.unitAddress) &&
                Objects.equals(workTime, that.workTime) &&
                Objects.equals(major, that.major) &&
                Objects.equals(unitName, that.unitName) &&
                Objects.equals(unitCode, that.unitCode) &&
                Objects.equals(expertTel, that.expertTel) &&
                Objects.equals(certype, that.certype) &&
                Objects.equals(lineStandard, that.lineStandard) &&
                Objects.equals(lineType, that.lineType) &&
                Objects.equals(expertAddress, that.expertAddress) &&
                Objects.equals(isBlackList, that.isBlackList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(expertId, expertName, expertIdcard, expartType, expertSex, expertSeniority, expertCreatTime, expertDelFlag, expertLevl, updateTime, drawExpertId, unitAddress, workTime, major, unitName, unitCode, expertTel, certype, lineStandard, lineType, expertAddress, isBlackList);
    }
}
